/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package edu.infomatik.tundra.logic;

import edu.infomatik.tundra.data.ILogicBean;
import edu.infomatik.tundra.logic.LifeStages;
import edu.infomatik.tundra.util.TundraConstants;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>US Task</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link edu.infomatik.tundra.USTaskBean.impl.USTaskImpl#getLifeStage <em>Life Stage</em>}</li>
 *   <li>{@link edu.infomatik.tundra.USTaskBean.impl.USTaskImpl#getPerCentOver <em>Per Cent Over</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class USTaskBean extends AChitChatBean implements ILogicBean{
	private final LifeStages DEFAULT_LIFE_STAGE = LifeStages.CREATED;	
	private LifeStages lifeStage=DEFAULT_LIFE_STAGE;
	private short percentOver;
	private long storyId;
	
	public USTaskBean() {
		super();
		setKind(WorkKinds.TASK);
	}

	public short getLifeStage() {
		return (short)this.lifeStage.getValue();
	}

	public void setLifeStage(short lifeStage) {
		if (null == (this.lifeStage=LifeStages.get(lifeStage)))
			this.lifeStage=LifeStages.CREATED;
	}

	public void setLifeStage(LifeStages lifeStage) {
			this.lifeStage=lifeStage;
	}

	public short getPercentOver() {
		return percentOver;
	}

	public void setPercentOver(short percentOver) {
		this.percentOver = percentOver;
	}

	public long getStoryId() {
		return storyId;
	}

	public void setStoryId(long storyId) {
		this.storyId = storyId;
	}
	
	@Override
	public short getClassId() {
		return TundraConstants.USER_TASK_CLASS;
	}
	
} //USTaskImpl
